<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>商品详情 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css" />
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .card {
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .swiper {
      width: 100%;
      height: 100%;
    }
    
    .swiper-slide {
      text-align: center;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    
    .swiper-pagination-bullet-active {
      background-color: var(--primary);
    }
    
    .quantity-control {
      display: flex;
      align-items: center;
      border: 1px solid #e5e7eb;
      border-radius: 4px;
      overflow: hidden;
    }
    
    .quantity-btn {
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #f9fafb;
      cursor: pointer;
      user-select: none;
    }
    
    .quantity-input {
      width: 40px;
      height: 28px;
      border: none;
      border-left: 1px solid #e5e7eb;
      border-right: 1px solid #e5e7eb;
      text-align: center;
      font-size: 14px;
    }
    
    .quantity-input:focus {
      outline: none;
    }
    
    .spec-option {
      display: inline-block;
      padding: 6px 12px;
      border: 1px solid #e5e7eb;
      border-radius: 4px;
      margin-right: 8px;
      margin-bottom: 8px;
      font-size: 12px;
      cursor: pointer;
    }
    
    .spec-option.selected {
      background-color: var(--primary-light);
      color: var(--primary);
      border-color: var(--primary);
    }
    
    .tab-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
    
    .product-image-indicator {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background-color: #ddd;
      margin: 0 3px;
    }
    
    .product-image-indicator.active {
      background-color: var(--primary);
      width: 8px;
      height: 8px;
    }
    
    .bottom-bar {
      border-top: 1px solid var(--border);
    }
    
    .spec-item {
      border: 1px solid #ddd;
      border-radius: 20px;
    }
    
    .spec-item.active {
      border-color: var(--primary);
      background-color: var(--primary-light);
      color: var(--primary);
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="javascript:history.back()" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">商品详情</h1>
      <div class="flex">
        <a href="#" class="mr-4">
          <i class="fas fa-share-alt text-lg"></i>
        </a>
        <a href="#" class="relative">
          <i class="fas fa-shopping-cart text-lg"></i>
          <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs w-4 h-4 flex items-center justify-center rounded-full">2</span>
        </a>
      </div>
    </div>
    
    <!-- 商品图片轮播 -->
    <div class="relative">
      <div class="w-full h-80 bg-gray-100">
        <img src="https://source.unsplash.com/random/800x600/?wheelchair" alt="轻便折叠轮椅" class="w-full h-full object-contain">
      </div>
      
      <!-- 图片指示器 -->
      <div class="absolute bottom-4 left-0 right-0 flex justify-center items-center">
        <div class="product-image-indicator active"></div>
        <div class="product-image-indicator"></div>
        <div class="product-image-indicator"></div>
        <div class="product-image-indicator"></div>
      </div>
    </div>
    
    <!-- 商品信息 -->
    <div class="bg-white p-4">
      <div class="flex justify-between items-start">
        <div>
          <h2 class="text-xl font-bold">轻便折叠轮椅</h2>
          <p class="text-sm text-gray-500 mt-1">铝合金材质 轻便耐用</p>
        </div>
        <div class="bg-red-50 text-red-500 px-2 py-1 rounded text-xs">
          热销商品
        </div>
      </div>
      
      <div class="flex items-baseline mt-3">
        <span class="text-xl text-red-500 font-bold">¥299</span>
        <span class="text-gray-400 line-through text-sm ml-2">¥399</span>
        <span class="text-xs bg-red-100 text-red-500 px-1 py-0.5 ml-2 rounded">7.5折</span>
      </div>
      
      <div class="flex items-center mt-3">
        <div class="text-sm text-gray-500">
          <span>销量: 256</span>
          <span class="mx-3">|</span>
          <span>评分: 4.9</span>
          <span class="mx-3">|</span>
          <span>评价: 128</span>
        </div>
      </div>
      
      <div class="flex items-center mt-3">
        <span class="text-xs bg-orange-100 text-orange-500 px-2 py-0.5 mr-2 rounded">包邮</span>
        <span class="text-xs bg-green-100 text-green-500 px-2 py-0.5 mr-2 rounded">正品保障</span>
        <span class="text-xs bg-blue-100 text-blue-500 px-2 py-0.5 rounded">7天无理由退换</span>
      </div>
    </div>
    
    <!-- 优惠券 -->
    <div class="bg-white mt-2 p-4">
      <div class="flex justify-between items-center">
        <div class="flex items-center">
          <span class="text-sm font-medium">优惠</span>
          <div class="ml-4 flex">
            <span class="bg-red-100 text-red-500 text-xs px-1 py-0.5 rounded mr-2">满299减30</span>
            <span class="bg-red-100 text-red-500 text-xs px-1 py-0.5 rounded">会员价¥279</span>
          </div>
        </div>
        <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
      </div>
    </div>
    
    <!-- 规格选择 -->
    <div class="bg-white mt-2 p-4">
      <div class="flex justify-between items-center" id="specSelector">
        <div class="flex items-center">
          <span class="text-sm font-medium">规格</span>
          <div class="ml-4">
            <span class="text-sm text-gray-500">已选：铝合金标准款</span>
          </div>
        </div>
        <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
      </div>
    </div>
    
    <!-- 商品评价 -->
    <div class="bg-white mt-2 p-4">
      <div class="flex justify-between items-center mb-4">
        <h3 class="font-medium">商品评价 (128)</h3>
        <a href="#" class="text-sm text-gray-500 flex items-center">
          查看全部 <i class="fas fa-chevron-right ml-1 text-xs"></i>
        </a>
      </div>
      
      <div class="mb-4">
        <div class="flex items-center mb-2">
          <div class="w-8 h-8 rounded-full bg-gray-200 flex items-center justify-center mr-2">
            <span class="text-sm">李</span>
          </div>
          <div>
            <p class="text-sm font-medium">李**</p>
            <div class="flex text-yellow-400 text-xs">
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
            </div>
          </div>
        </div>
        <p class="text-sm text-gray-600">轮椅质量非常好，折叠方便，老人坐着也舒服，推起来很轻松。客服态度也很好，发货速度快。</p>
        <p class="text-xs text-gray-400 mt-1">2023-10-15</p>
      </div>
      
      <div>
        <div class="flex items-center mb-2">
          <div class="w-8 h-8 rounded-full bg-gray-200 flex items-center justify-center mr-2">
            <span class="text-sm">张</span>
          </div>
          <div>
            <p class="text-sm font-medium">张**</p>
            <div class="flex text-yellow-400 text-xs">
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
              <i class="fas fa-star"></i>
            </div>
          </div>
        </div>
        <p class="text-sm text-gray-600">给家里老人买的，很实用，轻便好推，折叠后放在后备箱也不占地方，性价比很高。</p>
        <p class="text-xs text-gray-400 mt-1">2023-10-10</p>
      </div>
    </div>
    
    <!-- 商品详情 -->
    <div class="bg-white mt-2 p-4">
      <h3 class="font-medium mb-4">商品详情</h3>
      
      <div class="space-y-4">
        <div>
          <h4 class="text-sm font-medium mb-2">产品参数</h4>
          <div class="grid grid-cols-2 gap-2 text-sm">
            <div class="bg-gray-50 p-2 rounded">
              <span class="text-gray-500">品牌：</span>邦伴健康
            </div>
            <div class="bg-gray-50 p-2 rounded">
              <span class="text-gray-500">材质：</span>铝合金
            </div>
            <div class="bg-gray-50 p-2 rounded">
              <span class="text-gray-500">重量：</span>8.5kg
            </div>
            <div class="bg-gray-50 p-2 rounded">
              <span class="text-gray-500">承重：</span>100kg
            </div>
            <div class="bg-gray-50 p-2 rounded">
              <span class="text-gray-500">尺寸：</span>展开92×63×90cm
            </div>
            <div class="bg-gray-50 p-2 rounded">
              <span class="text-gray-500">折叠尺寸：</span>30×63×90cm
            </div>
          </div>
        </div>
        
        <div>
          <h4 class="text-sm font-medium mb-2">产品特点</h4>
          <ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
            <li>轻便铝合金材质，整车仅重8.5kg</li>
            <li>人体工学座椅，舒适透气</li>
            <li>一键折叠，方便收纳与携带</li>
            <li>加宽扶手，使用更舒适</li>
            <li>加大后轮，通过性更强</li>
            <li>配备安全带和防翻装置，安全可靠</li>
          </ul>
        </div>
        
        <div>
          <h4 class="text-sm font-medium mb-2">适用人群</h4>
          <p class="text-sm text-gray-600">
            适合行动不便的老人、伤残人士、术后康复患者等，可用于室内外短途代步。
          </p>
        </div>
        
        <div>
          <h4 class="text-sm font-medium mb-2">产品图片</h4>
          <div class="space-y-2">
            <div class="bg-gray-100 h-40 w-full flex items-center justify-center">
              <span class="text-gray-400">产品正面图</span>
            </div>
            <div class="bg-gray-100 h-40 w-full flex items-center justify-center">
              <span class="text-gray-400">产品侧面图</span>
            </div>
            <div class="bg-gray-100 h-40 w-full flex items-center justify-center">
              <span class="text-gray-400">折叠演示图</span>
            </div>
            <div class="bg-gray-100 h-40 w-full flex items-center justify-center">
              <span class="text-gray-400">细节展示图</span>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 推荐商品 -->
    <div class="bg-white mt-2 p-4 mb-20">
      <h3 class="font-medium mb-4">相关推荐</h3>
      
      <div class="grid grid-cols-2 gap-3">
        <a href="product_detail.html" class="card bg-white p-2">
          <div class="rounded-lg bg-gray-100 h-24 flex items-center justify-center mb-2">
            <i class="fas fa-bed text-2xl text-gray-400"></i>
          </div>
          <p class="text-sm font-medium">多功能护理床</p>
          <p class="text-xs text-gray-500 truncate">电动升降 防褥疮设计</p>
          <p class="text-sm primary-color font-medium mt-1">¥899</p>
        </a>
        
        <a href="product_detail.html" class="card bg-white p-2">
          <div class="rounded-lg bg-gray-100 h-24 flex items-center justify-center mb-2">
            <i class="fas fa-walking text-2xl text-gray-400"></i>
          </div>
          <p class="text-sm font-medium">老人助行器</p>
          <p class="text-xs text-gray-500 truncate">可折叠 铝合金材质</p>
          <p class="text-sm primary-color font-medium mt-1">¥199</p>
        </a>
        
        <a href="product_detail.html" class="card bg-white p-2">
          <div class="rounded-lg bg-gray-100 h-24 flex items-center justify-center mb-2">
            <i class="fas fa-chair text-2xl text-gray-400"></i>
          </div>
          <p class="text-sm font-medium">老人洗澡椅</p>
          <p class="text-xs text-gray-500 truncate">防滑设计 安全舒适</p>
          <p class="text-sm primary-color font-medium mt-1">¥159</p>
        </a>
        
        <a href="product_detail.html" class="card bg-white p-2">
          <div class="rounded-lg bg-gray-100 h-24 flex items-center justify-center mb-2">
            <i class="fas fa-toilet text-2xl text-gray-400"></i>
          </div>
          <p class="text-sm font-medium">便携坐便器</p>
          <p class="text-xs text-gray-500 truncate">可折叠 适合卧床老人</p>
          <p class="text-sm primary-color font-medium mt-1">¥229</p>
        </a>
      </div>
    </div>
    
    <!-- 底部操作栏 -->
    <div class="fixed bottom-0 left-0 right-0 bg-white bottom-bar flex z-20" style="width: 375px; margin: 0 auto;">
      <div class="flex-1 flex">
        <a href="#" class="flex flex-col items-center justify-center w-1/3 py-2">
          <i class="fas fa-headset text-gray-500"></i>
          <span class="text-xs text-gray-500 mt-1">客服</span>
        </a>
        <a href="#" class="flex flex-col items-center justify-center w-1/3 py-2">
          <i class="fas fa-store text-gray-500"></i>
          <span class="text-xs text-gray-500 mt-1">店铺</span>
        </a>
        <a href="#" class="flex flex-col items-center justify-center w-1/3 py-2">
          <i class="far fa-heart text-gray-500"></i>
          <span class="text-xs text-gray-500 mt-1">收藏</span>
        </a>
      </div>
      <div class="flex-1 flex">
        <button class="flex-1 bg-orange-100 text-orange-500 text-sm font-medium">加入购物车</button>
        <button class="flex-1 bg-orange-500 text-white text-sm font-medium">立即购买</button>
      </div>
    </div>
    
    <!-- 规格选择弹窗 -->
    <div id="specModal" class="fixed inset-0 bg-black bg-opacity-50 z-30 hidden">
      <div class="absolute bottom-0 left-0 right-0 bg-white rounded-t-xl" style="width: 375px; margin: 0 auto;">
        <div class="p-4 max-h-[70vh] overflow-y-auto">
          <div class="flex justify-between items-start mb-4">
            <div class="flex">
              <div class="w-20 h-20 bg-gray-100 rounded-lg flex items-center justify-center">
                <i class="fas fa-wheelchair text-2xl text-gray-400"></i>
              </div>
              <div class="ml-3">
                <p class="text-lg text-red-500 font-bold">¥299</p>
                <p class="text-sm text-gray-500">库存：1000件</p>
                <p class="text-sm text-gray-500">已选：铝合金标准款</p>
              </div>
            </div>
            <button id="closeSpecModal" class="text-gray-400">
              <i class="fas fa-times text-xl"></i>
            </button>
          </div>
          
          <div class="mb-4">
            <h4 class="text-sm font-medium mb-2">材质</h4>
            <div class="flex flex-wrap gap-2">
              <div class="spec-item px-3 py-1 text-sm active">铝合金</div>
              <div class="spec-item px-3 py-1 text-sm">碳钢</div>
            </div>
          </div>
          
          <div class="mb-4">
            <h4 class="text-sm font-medium mb-2">款式</h4>
            <div class="flex flex-wrap gap-2">
              <div class="spec-item px-3 py-1 text-sm active">标准款</div>
              <div class="spec-item px-3 py-1 text-sm">加宽款</div>
              <div class="spec-item px-3 py-1 text-sm">豪华款</div>
            </div>
          </div>
          
          <div class="mb-4">
            <h4 class="text-sm font-medium mb-2">颜色</h4>
            <div class="flex flex-wrap gap-2">
              <div class="spec-item px-3 py-1 text-sm active">黑色</div>
              <div class="spec-item px-3 py-1 text-sm">蓝色</div>
              <div class="spec-item px-3 py-1 text-sm">红色</div>
            </div>
          </div>
          
          <div class="mb-4">
            <h4 class="text-sm font-medium mb-2">购买数量</h4>
            <div class="flex items-center">
              <button class="w-8 h-8 border border-gray-300 flex items-center justify-center rounded-l">
                <i class="fas fa-minus text-gray-400"></i>
              </button>
              <input type="text" value="1" class="w-12 h-8 border-t border-b border-gray-300 text-center">
              <button class="w-8 h-8 border border-gray-300 flex items-center justify-center rounded-r">
                <i class="fas fa-plus text-gray-400"></i>
              </button>
            </div>
          </div>
          
          <div class="flex mt-6">
            <button class="flex-1 py-3 bg-orange-100 text-orange-500 text-sm font-medium mr-2">加入购物车</button>
            <button class="flex-1 py-3 bg-orange-500 text-white text-sm font-medium">立即购买</button>
          </div>
        </div>
      </div>
    </div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js"></script>
  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 规格选择弹窗
      const specSelector = document.getElementById('specSelector');
      const specModal = document.getElementById('specModal');
      const closeSpecModal = document.getElementById('closeSpecModal');
      
      specSelector.addEventListener('click', function() {
        specModal.classList.remove('hidden');
        document.body.style.overflow = 'hidden';
      });
      
      closeSpecModal.addEventListener('click', function() {
        specModal.classList.add('hidden');
        document.body.style.overflow = '';
      });
      
      // 点击规格选项
      const specItems = document.querySelectorAll('.spec-item');
      specItems.forEach(item => {
        item.addEventListener('click', function() {
          // 找到同组的规格选项
          const siblings = Array.from(this.parentElement.children);
          siblings.forEach(sib => sib.classList.remove('active'));
          this.classList.add('active');
        });
      });
      
      // 点击弹窗外部关闭
      specModal.addEventListener('click', function(e) {
        if (e.target === specModal) {
          specModal.classList.add('hidden');
          document.body.style.overflow = '';
        }
      });
    });
  </script>
</body>
</html> 